#ifndef _OPENSC_WINCONFIG_H
#define _OPENSC_WINCONFIG_H

#include <stdio.h>

#ifdef WIN32
	#include <windows.h>

    #ifndef snprintf
     #define snprintf _snprintf
    #endif

    #ifndef vsnprintf
     //#define vsnprintf _vsnprintf
    #endif

#else
    #define HAVE_SYS_TIME_H
#endif

#include <sys/timeb.h>
#include <sys/stat.h>

#ifndef strcasecmp
#define strcasecmp stricmp
#endif

#ifndef strncasecmp
#define strncasecmp strnicmp
#endif


#ifndef isatty
#define isatty _isatty
#endif

#ifndef stricmp
#define stricmp _stricmp
#endif

#ifndef fileno
#define fileno _fileno
#endif

#ifndef mkdir
#define mkdir _mkdir
#endif

#ifndef access
#define access _access
#endif

#ifndef unlink
#define unlink _unlink
#endif

#ifndef putenv
#define putenv _putenv
#endif


#ifndef R_OK
#define R_OK  4		/* test whether readable.  */
#define W_OK  2		/* test whether writable.  */
#define X_OK  1		/* test whether execubale. */
#define F_OK  0		/* test whether exist.  */
#endif

#ifndef S_IRUSR
#define S_IRUSR S_IREAD
#endif

#ifndef S_IWUSR
#define S_IWUSR S_IWRITE
#endif


#endif
